home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.compilers / comp.sys.amiga.programmer_7005_000026.msg < prev    next >
Encoding:
Text File  |  1994-11-27  |  1.9 KB  |  49 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: dd.chalmers.se!news.chalmers.se!sunic!EU.net!howland.reston.ans.net!gatech!concert!sas!mozart.unx.sas.com!walker
  3. From: walker@twix.unx.sas.com (Doug Walker)
  4. Subject: Re: interrupt in SAS/C 6.51
  5. Originator: walker@twix.unx.sas.com
  6. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  7. Message-ID: <CMAttx.Ltn@unx.sas.com>
  8. Date: Mon, 7 Mar 1994 14:34:41 GMT
  9. References:  <1994Mar6.035403.28339@cdf.toronto.edu>
  10. Nntp-Posting-Host: twix.unx.sas.com
  11. Organization: SAS Institute Inc.
  12. Lines: 45
  13.  
  14.  
  15. In article <1994Mar6.035403.28339@cdf.toronto.edu>, a228grai@cdf.toronto.edu (Darrell Grainger) writes:
  16. |> Now if I create the function VertBServer using assembler I can get this to
  17. |> work fine but what I would like to do (and this is just for experimental
  18. |> purposes) is create the function VertBServer using C language. The code
  19. |> for VertBServer is simply:
  20. |> 
  21. |>     Signal(task, SIGBREAKF_CTRL_F);
  22. |> 
  23. |> The variable task is a global variable initialized by the main code using:
  24. |> 
  25. |>     task = FindTask(NULL);
  26. |> 
  27. |> I've read some stuff about __interrupt in the SAS/C manual but it is not
  28. |> entirely clear. I think I am probably not setting the Z flag when exiting
  29. |> the VertBServer function. References to the manuals would actually be
  30. |> appreciated.
  31.  
  32. How about this?
  33.  
  34.    struct Task *task;
  35.  
  36.    void __interrupt __saveds VertBServer(void)
  37.    {
  38.       Signal(task, SIGBREAKF_CTRL_F);
  39.    }
  40.  
  41. or just add __far to the definition of the extern and you can do
  42. away with the __saveds keyword on the function.
  43.  
  44. What's probably happening is that register A4 is not set up to
  45. point to your near data section.  Globals are by default accessed
  46. relative to A4 (NEAR data).  You can either add the __saveds keyword
  47. to set up register A4, or you can access the global with FAR data
  48. accessing by adding the __far keyword to it.
  49.